import pytesseract
from PIL import Image
from ShowapiRequest import ShowapiRequest

r = ShowapiRequest("http://route.showapi.com/184-4","101290","bff0fe2ab4a743538879d2f187ace8f1" )
r.addFilePara("image", "D:/heqq/web/moke2.png")
r.addBodyPara("typeId", "35")
r.addBodyPara("convert_to_jpg", "0")
r.addBodyPara("needMorePrecise", "0")
res = r.post()
text = res.json()['showapi_res_body']['Result']
print(text) # 返回信息

# img = Image.open("D:/heqq/web/1.jpg")
# text = pytesseract.image_to_string(img)
# print(text)